#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int p1,p2,p3;
int a,b,c;
int main()
{
	int n;
	cin >> n;
	int x1,y1;
	double r1;
	cin >> x1 >> y1;
	r1 = y1*1.0/x1;
	int x,y;
	n--;
	double r;
	while(n--)
	{
		cin >> x >> y;
		r = y*1.0/x;
		if(r-r1>0.05)
		{
			cout <<"better"<<endl;
		}
		else if(r1-r>0.05)
		{
			cout << "worse"<<endl;
		}
		else
		cout << "same" << endl;
	} 
}

